package com.example.datasourcetest.mapper;

import com.example.datasourcetest.bean.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Service;

import java.util.List;

@Mapper
public interface UserMapper {

    @Select("select id,name from user")
    public List<User> query();

    @Insert("insert into user(name) values('dana')")
    public int insert();
}
